package request;

import record.UserRecord;
import util.HashedPassword;

/**
 * Request is used to change credentials of a user. It uses the email address of the user to check
 * against the UserRecord. 
 * @author Sean Freitag
 * @author Jacob Freemyer
 * @author Stephan Jossie
 *
 */
@SuppressWarnings("serial")
public class ChangeCredentialsRequest implements Request {
	/**
	 * Identifier for user
	 */
	private String emailAddress;
	
	/**
	 * Password for user
	 */
	private HashedPassword password;
	
	/**
	 * The users record
	 */
	private UserRecord record;

	/**
	 * Creates a new ChangeCredentialsRequest object in which to send a 'String' address to check
	 * with the UserRecord.
	 */	
	public ChangeCredentialsRequest()
	{
		
	}

	/**
	 * Getter for email address.
	 * @return
	 * 		Users email address
	 */
	public String getEmailAddress()
	{
		return emailAddress;
	}
	
	/**
	 * Getter to get the password
	 * @return
	 * a hashed version of the password
	 */
	public HashedPassword getPassword()
	{
		return password;
	}
	
	/**
	 * Getter to get the user record
	 * @return
	 * Users record
	 */
	public UserRecord getUserRecord()
	{
		return record;
	}
	
	/**
	 * Setter to set the email address
	 * @param pEmailAddress
	 * Email Address
	 */
	public void setEmailAddress(String pEmailAddress)
	{
		emailAddress = pEmailAddress;
	}
	
	/**
	 * Setter to set the password
	 * @param pPassword
	 * password
	 */
	public void setPassword(HashedPassword pPassword)
	{
		password = pPassword;
	}
	
	/**
	 * Setter to set the user record
	 * @param pRecord
	 * User record
	 */
	public void setUserRecord(UserRecord pRecord)
	{
		record = pRecord;
	}
}
